package com.cfpl.project_common.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * @TableName pesticide_acquire_record
 */
@TableName(value ="pesticide_acquire_record")
public class PesticideAcquireRecord implements Serializable {
//    农药领取记录id
    private Long id;
//      农药id
    private Long pesticideTypeId;
//      领取日期
    private Date acquireDate;
//    领取人id
    private Long adminId;
//    农药使用量
    private Integer pesticideUsage;
//    领取总量
    private Integer acquireQuantity;

    private static final long serialVersionUID = 1L;

    public Long  getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPesticideTypeId() {
        return (pesticideTypeId);
    }

    public void setPesticideTypeId(Long pesticideTypeId) {
        this.pesticideTypeId = pesticideTypeId;
    }

    public Date getAcquireDate() {
        return acquireDate;
    }

    public void setAcquireDate(Date acquireDate) {
        this.acquireDate = acquireDate;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public Integer getPesticideUsage() {
        return pesticideUsage;
    }

    public void setPesticideUsage(Integer pesticideUsage) {
        this.pesticideUsage = pesticideUsage;
    }

    public Integer getAcquireQuantity() {
        return acquireQuantity;
    }

    public void setAcquireQuantity(Integer acquireQuantity) {
        this.acquireQuantity = acquireQuantity;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PesticideAcquireRecord other = (PesticideAcquireRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPesticideTypeId() == null ? other.getPesticideTypeId() == null : this.getPesticideTypeId().equals(other.getPesticideTypeId()))
            && (this.getAcquireDate() == null ? other.getAcquireDate() == null : this.getAcquireDate().equals(other.getAcquireDate()))
            && (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
            && (this.getPesticideUsage() == null ? other.getPesticideUsage() == null : this.getPesticideUsage().equals(other.getPesticideUsage()))
            && (this.getAcquireQuantity() == null ? other.getAcquireQuantity() == null : this.getAcquireQuantity().equals(other.getAcquireQuantity()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPesticideTypeId() == null) ? 0 : getPesticideTypeId().hashCode());
        result = prime * result + ((getAcquireDate() == null) ? 0 : getAcquireDate().hashCode());
        result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());
        result = prime * result + ((getPesticideUsage() == null) ? 0 : getPesticideUsage().hashCode());
        result = prime * result + ((getAcquireQuantity() == null) ? 0 : getAcquireQuantity().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pesticideTypeId=").append(pesticideTypeId);
        sb.append(", acquireDate=").append(acquireDate);
        sb.append(", adminId=").append(adminId);
        sb.append(", pesticideUsage=").append(pesticideUsage);
        sb.append(", acquireQuantity=").append(acquireQuantity);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}